package com.zhiche.lisa.bms.service.driver;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zhiche.lisa.bms.dao.model.driver.PriceconfFreight;
import com.zhiche.lisa.bms.pojo.vo.driver.PriceconfFreightVO;
import com.zhiche.lisa.core.supports.BaseException;
import org.springframework.validation.BindingResult;

import java.util.Date;

/**
 * <p>
 * 线路单公里运价 服务类
 * </p>
 *
 * @author zhaoguixin
 * @since 2018-08-30
 */
public interface IPriceconfFreightService extends IService<PriceconfFreight> {

	/**
	 * 分页查询线路价格
	 *
	 * @param page
	 * @return
	 */
	Page<PriceconfFreightVO> listByPage(Page<PriceconfFreightVO> page);

	/**
	 * 添加线路价格
	 *
	 * @param priceconfFreightVO
	 * @param br
	 * @return
	 */
	Integer add(PriceconfFreightVO priceconfFreightVO, BindingResult br);

	/**
	 * 更新线路价格
	 *
	 * @param priceconfFreightVO
	 * @param br
	 * @return
	 */
	Boolean update(PriceconfFreightVO priceconfFreightVO, BindingResult br);

	/**
	 * 删除线路信息
	 *
	 * @param id
	 * @return
	 * @throws BaseException
	 */
	Boolean del(Integer id) throws BaseException;

	/**
	 * 根据ID得到线路线路价格信息
	 *
	 * @param id
	 * @return
	 */
	PriceconfFreightVO getById(Integer id);

	/**
	 * 根据线路取得最新价格
	 *
	 * @param routeId
	 * @param effectiveDate
	 * @return
	 */
	PriceconfFreight selectByEffectiveDateAndRouteId(Integer routeId, Date effectiveDate);
}
